package com.party.web.web.dto.output.member;

import com.party.core.model.commune.CNotebook;
import com.party.core.model.commune.CNotebookType;
import com.party.web.web.dto.input.member.CNotebookTypeInput;
import org.apache.commons.beanutils.BeanUtils;

import java.lang.reflect.InvocationTargetException;

/**
 * @program: party
 * @description: 笔记本输出
 * @author: Hua Qunhao
 * @create: 2019-12-26 11:08
 **/
public class CNotebookTypeOutput extends CNotebookType {
    //素材数量
    private Integer materialTypeNum;

    public Integer getMaterialTypeNum() {
        return materialTypeNum;
    }

    public void setMaterialTypeNum(Integer materialTypeNum) {
        this.materialTypeNum = materialTypeNum;
    }

    public static CNotebookTypeOutput transform(CNotebookType input) {
        CNotebookTypeOutput output = new CNotebookTypeOutput();
        try {
            BeanUtils.copyProperties(output, input);
        } catch (IllegalAccessException | InvocationTargetException e) {
            e.printStackTrace();
        }
        return output;
    }
}
